using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using TerritoryGame.Infrastructure.Data;

namespace TerritoryGame.Infrastructure.Data.Migrations
{
    [DbContext(typeof(TerritoryGameDbContext))]
    [Migration("20250819002000_AddUserIdToGameHistoryPlayer")]
    public partial class AddUserIdToGameHistoryPlayer : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "UserId",
                table: "GameHistoryPlayers",
                type: "text",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_GameHistoryPlayers_UserId",
                table: "GameHistoryPlayers",
                column: "UserId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_GameHistoryPlayers_UserId",
                table: "GameHistoryPlayers");

            migrationBuilder.DropColumn(
                name: "UserId",
                table: "GameHistoryPlayers");
        }
    }
}


